﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;

namespace CoayBookDownloader
{
    class Util
    {
        public static void WriteToFile(String strMsg,String FileName)
        {
            try
            {
                FileStream aFile = new FileStream(FileName, FileMode.OpenOrCreate);
                StreamWriter sw = new StreamWriter(aFile);
                // Write data to file.
                sw.Write(strMsg);
                sw.Close();
            }
            catch (IOException ex)
            {
                Trace.WriteLine("An IOException has been thrown!");
                Trace.WriteLine(ex.ToString());
                return;
            }
        }
    }
}
